package com.taotao.tools.validate.annotations;

import com.taotao.tools.validate.validator.UnionFieldValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;


/**
 * 字段联合校验。用于对象上,表示开启联合校验
 * @author youbeiwuhuan
 */
@Inherited
@Target({TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy = {UnionFieldValidator.class})
@Documented
public @interface UnionValids {



    String message() default "";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
